/**
 * Created by Generator on 2017/08/03
 */
package com.nmgmd.shequ.hospital.base.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.nmghr.base.jpa.annotation.ColumnComment;
import com.nmghr.base.jpa.entity.UUIDWithTimeEntity;
import javax.persistence.*;
import java.math.BigDecimal;

@Entity
@Table(name = "t_hos_sale")
@Data
@EqualsAndHashCode(callSuper = true)
public class SaleEntity extends UUIDWithTimeEntity {
    @Column(name="buy_quantity", precision=18)
    @ColumnComment(msg = "购买数量")
    private BigDecimal buyQuantity;

    @Column(name="unit_price", precision=18, scale=2)
    @ColumnComment(msg = "单价")
    private BigDecimal unitPrice;

    @Column(name="receive_total", precision=18, scale=2)
    @ColumnComment(msg = "总应收")
    private BigDecimal receiveTotal;

    @ColumnComment(msg = "账单")
    @ManyToOne
    @JoinColumn(name = "bill_id")
    private BillEntity bill;

    @ColumnComment(msg = "进货")
    @ManyToOne
    @JoinColumn(name = "stock_id")
    private StockEntity stock;

}
